package circuit1;

/*
 * Borovicska Szglab4 2011
 * @package circuit1
 */
/**
 *
 * @author Erik
 */
        
public class And extends Gate {
    
    public And(){
        setChanged();
        this.notifyObservers(this);
    }
    
    /**
     * Az And kapu kiertekelesenek logikaja
     * @return 
     */
    public boolean act() {

        for (int i = 0; i < inputs.wires.size(); i++) {
            if (inputs.getInput(i).getValue() == false) {
                return false;
            }
        }
        return true;
    }
}
